<script setup lang="ts">
import { useRouter } from 'vue-router';

const router = useRouter();

const goToAIChat = () => {
    router.push('/ai-chat');
};
</script>

<template>
    <div class="floating-ai-chat" @click="goToAIChat">
        <div class="floating-icon">
            <van-icon name="chat-o" size="24" color="#fff" />
        </div>
        <div class="floating-text">AI客服</div>
    </div>
</template>

<style scoped>
.floating-ai-chat {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #007AFF 0%, #5B9CFF 100%);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(0, 122, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1000;
}

.floating-ai-chat:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 122, 255, 0.4);
}

.floating-ai-chat:active {
    transform: scale(0.95);
}

.floating-icon {
    margin-bottom: 2px;
}

.floating-text {
    font-size: 10px;
    color: #fff;
    font-weight: 500;
    line-height: 1;
}
</style>